public class Text {
    public static void main(String[] args) {
        int[] array={4,1,2,1,2};
        int ret=func(array);
        System.out.println(ret);
    }
    public static int func(int[] array){
        int ret=0;
        for (int i = 0; i < array.length; i++) {
            ret ^=array[i];
        }
        return ret;
    }
}
